GEO: Populate placer name.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 13 Sep 2005 19:58:34 +0000 (19:58 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 13 Sep 2005 19:58:34 +0000 (19:58 +0000)
gpsbabel/geo.c

index c1f4fc96aee363283b82c3b3671dfc8869889fb2..974ca8b5940da08445a54e25bac4a0efe4e017f3 100644 (file)
@@ -91,12 +91,15 @@ void wpt_name_s(const char *args, const char **attrv)
 
 void wpt_name(const char *args, const char **unused)
 {
+       char *s;
        if (!args) return;
 
        wpt_tmp->description = xstrappend(wpt_tmp->description,args);
-       if (nuke_placer) {
-               char *s = xstrrstr(wpt_tmp->description, " by ");
-               if (s) {
+       s = xstrrstr(wpt_tmp->description, " by ");
+       if (s) {
+               wpt_tmp->gc_data.placer = xstrdup(s + 4);
+
+               if (nuke_placer) {
                        *s = '\0';
                }
        }